***************************************************************************************
*		Reproduction do-file for: 											 		  *
*			Steiner/Harms/Landwehr 													  * 
* 			False Consensus Beliefs and Populist Attitudes	 				   		  *
* 			Political Psychology	 				   								  *
***************************************************************************************


* This package contains the Stata code to reproduce all findings reported in the article:
* Steiner, Nils D./Landwehr, Claudia/Harms, Philipp (forthcoming): False Consensus Beliefs and Populist Attitudes, Political Psychology.
* The dataset used can be obtained from GESIS, see: https://search.gesis.org/research_data/ZA5665.
* The code below uses version 52 of the dataset, but all subsequent versions should work as well 
		
	
**# Bookmark #1
********************************************************************************
******************* Settings and preparations **********************************
********************************************************************************

* install necessary ados and packages
ssc install ciplot
ssc install coefplot
ssc install estout
ssc install joyplot
ssc install schemepack

* settings
clear all
set maxvar 25000
graph set window fontface "Times New Roman"
set scheme white_tableau
version 18


/*
*** This creates the dataset for the analysis based on the files provided by GESIS (see above)

* merge and append the GESIS Panel data (to be obtained from GESIS) 
do "GESIS_Panel_v52\data\stata\ZA5664-65_merge-and-append-files.do" 
save "GESIS Panel data_v52.dta", replace
clear

* convert to unicode
unicode encoding set latin1
unicode translate "GESIS Panel data_v52.dta"
*/

clear
use "GESIS Panel data_v52.dta"

	

**# Bookmark #2
********************************************************************************
**************************** Recoding ******************************************
********************************************************************************

*** Design weight for wave ib (wave with our false consensus items)
	recode ibza007a (-66/-1=.), gen(dweight_ib)
	svyset _n [pweight=dweight_ib]	


***** False consensus items
		
	*** Items with own position
		recode ibda106a (1=4 "fully in favour") (2=3 "rather in favour") (3=2 "partly/partly") (4=1 "rather against") (5=0 "fully against") (-999/-1=.), gen(Asylum_own)
		recode ibda107a (1=4 "fully in favour") (2=3 "rather in favour") (3=2 "partly/partly") (4=1 "rather against") (5=0 "fully against") (-999/-1=.), gen(TaxRich_own)
		recode ibda108a (1=4 "fully in favour") (2=3 "rather in favour") (3=2 "partly/partly") (4=1 "rather against") (5=0 "fully against") (-999/-1=.), gen(SocBenefits_own)
		recode ibda109a (1=4 "fully in favour") (2=3 "rather in favour") (3=2 "partly/partly") (4=1 "rather against") (5=0 "fully against") (-999/-1=.), gen(WomenQuota_own)
		recode ibda110a (1=4 "fully in favour") (2=3 "rather in favour") (3=2 "partly/partly") (4=1 "rather against") (5=0 "fully against") (-999/-1=.), gen(LiftCovid_own)
		recode ibda111a (1=4 "fully in favour") (2=3 "rather in favour") (3=2 "partly/partly") (4=1 "rather against") (5=0 "fully against") (-999/-1=.), gen(RestrImport_own)
		recode ibda112a (1=4 "fully in favour") (2=3 "rather in favour") (3=2 "partly/partly") (4=1 "rather against") (5=0 "fully against") (-999/-1=.), gen(LessEU_own)

		label variable Asylum_own "Right to asylum abolished" 
		label variable TaxRich_own "Higher taxes for the rich"  
		label variable SocBenefits_own "Higher welfare benefits" 
		label variable WomenQuota_own "Mandatory women quota" 
		label variable LiftCovid_own "Lift COVID measures" 
		label variable RestrImport_own "Restrict imports" 
		label variable LessEU_own "Return EU powers" 

		foreach var of varlist Asylum_own TaxRich_own SocBenefits_own WomenQuota_own LiftCovid_own RestrImport_own LessEU_own {
		sum `var'	
		gen `var'_st=(`var'-r(min))/(r(max)-r(min))	
		}
		label variable Asylum_own_st "Right to asylum abolished" 
		label variable TaxRich_own_st "Higher taxes for the rich"  
		label variable SocBenefits_own_st "Higher welfare benefits" 
		label variable WomenQuota_own_st "Mandatory women quota" 
		label variable LiftCovid_own_st "Lift COVID measures" 
		label variable RestrImport_own_st "Restrict imports" 
		label variable LessEU_own_st "Return EU powers" 

		* Collapsed version
		recode ibda106a (1 2=1 "in favour") (3=0 "partly/partly") (4 5=-1 "against") (-999/-1=.), gen(Asylum_own_tr)
		recode ibda107a (1 2=1 "in favour") (3=0 "partly/partly") (4 5=-1 "against") (-999/-1=.), gen(TaxRich_own_tr)
		recode ibda108a (1 2=1 "in favour") (3=0 "partly/partly") (4 5=-1 "against") (-999/-1=.), gen(SocBenefits_own_tr)
		recode ibda109a (1 2=1 "in favour") (3=0 "partly/partly") (4 5=-1 "against") (-999/-1=.), gen(WomenQuota_own_tr)
		recode ibda110a (1 2=1 "in favour") (3=0 "partly/partly") (4 5=-1 "against") (-999/-1=.), gen(LiftCovid_own_tr)
		recode ibda111a (1 2=1 "in favour") (3=0 "partly/partly") (4 5=-1 "against") (-999/-1=.), gen(RestrImport_own_tr)
		recode ibda112a (1 2=1 "in favour") (3=0 "partly/partly") (4 5=-1 "against") (-999/-1=.), gen(LessEU_own_tr)	

		label variable Asylum_own_tr "Right to asylum abolished" 
		label variable TaxRich_own_tr "Higher taxes for the rich"  
		label variable SocBenefits_own_tr "Higher welfare benefits" 
		label variable WomenQuota_own_tr "Mandatory women quota" 
		label variable LiftCovid_own_tr "Lift COVID measures" 
		label variable RestrImport_own_tr "Restrict imports" 
		label variable LessEU_own_tr "Return EU powers" 
		
		recode ibda106a (1 2=2 "in favour") (3=1 "partly/partly") (4 5=0 "against") (-999/-1=.), gen(Asylum_own_tr2)
		recode ibda107a (1 2=2 "in favour") (3=1 "partly/partly") (4 5=0 "against") (-999/-1=.), gen(TaxRich_own_tr2)
		recode ibda108a (1 2=2 "in favour") (3=1 "partly/partly") (4 5=0 "against") (-999/-1=.), gen(SocBenefits_own_tr2)
		recode ibda109a (1 2=2 "in favour") (3=1 "partly/partly") (4 5=0 "against") (-999/-1=.), gen(WomenQuota_own_tr2)
		recode ibda110a (1 2=2 "in favour") (3=1 "partly/partly") (4 5=0 "against") (-999/-1=.), gen(LiftCovid_own_tr2)
		recode ibda111a (1 2=2 "in favour") (3=1 "partly/partly") (4 5=0 "against") (-999/-1=.), gen(RestrImport_own_tr2)
		recode ibda112a (1 2=2 "in favour") (3=1 "partly/partly") (4 5=0 "against") (-999/-1=.), gen(LessEU_own_tr2)	

		label variable Asylum_own_tr2 "Right to asylum abolished" 
		label variable TaxRich_own_tr2 "Higher taxes for the rich"  
		label variable SocBenefits_own_tr2 "Higher welfare benefits" 
		label variable WomenQuota_own_tr2 "Mandatory women quota" 
		label variable LiftCovid_own_tr2 "Lift COVID measures" 
		label variable RestrImport_own_tr2 "Restrict imports" 
		label variable LessEU_own_tr2 "Return EU powers" 	
		
		
	*** Table 1: Issue items for measuring false consensus beliefs 
		svy: tab LiftCovid_own_tr
		svy: tab Asylum_own_tr
		svy: tab LessEU_own_tr
		svy: tab RestrImport_own_tr2
		svy: tab WomenQuota_own_tr2
		svy: tab TaxRich_own_tr2
		svy: tab SocBenefits_own_tr2		
		
	*** Items with estimated agreement by the public
		tab ibda113a
		tab ibda114a
		tab ibda115a 
		tab ibda116a 
		tab ibda117a 
		tab ibda118a 
		tab ibda119a 

		destring ibda113a, gen(Asylum_est) ignore("%") force
		replace Asylum_est=. if Asylum_est>100 | Asylum_est<0

		destring ibda114a, gen(TaxRich_est) ignore("%") force
		replace TaxRich_est=. if TaxRich_est>100 | TaxRich_est<0

		destring ibda115a, gen(SocBenefits_est) ignore("%") force
		replace SocBenefits_est=. if SocBenefits_est>100 | SocBenefits_est<0

		destring ibda116a, gen(WomenQuota_est) ignore("%") force
		replace WomenQuota_est=. if WomenQuota_est>100 | WomenQuota_est<0

		destring ibda117a, gen(LiftCovid_est) ignore("%") force
		replace LiftCovid_est=. if LiftCovid_est>100 | LiftCovid_est<0

		destring ibda118a, gen(RestrImport_est) ignore("%") force
		replace RestrImport_est=. if RestrImport_est>100 | RestrImport_est<0

		destring ibda119a, gen(LessEU_est) ignore("%") force
		replace LessEU_est=. if LessEU_est>100 | LessEU_est<0

		sum Asylum_own TaxRich_own SocBenefits_own WomenQuota_own LiftCovid_own RestrImport_own LessEU_own

		foreach var of varlist Asylum_est TaxRich_est SocBenefits_est WomenQuota_est LiftCovid_est RestrImport_est LessEU_est {
			replace `var'=`var'/100	
			}			
		
	*** Calculate share that is in favour per item
		* generate dummy for being in favour
		recode Asylum_own (3 4=1) (0 1 2=0), gen(Asylum_own_dummy)
		recode TaxRich_own (3 4=1) (0 1 2=0), gen(TaxRich_own_dummy)
		recode SocBenefits_own (3 4=1) (0 1 2=0), gen(SocBenefits_own_dummy)
		recode WomenQuota_own (3 4=1) (0 1 2=0), gen(WomenQuota_own_dummy)
		recode LiftCovid_own (3 4=1) (0 1 2=0), gen(LiftCovid_own_dummy)
		recode RestrImport_own (3 4=1) (0 1 2=0), gen(RestrImport_own_dummy)
		recode LessEU_own (3 4=1) (0 1 2=0), gen(LessEU_own_dummy)

		* calculate share that is in favour 
			// -> mean of dummy variable that measures whether someone is in favour or not 
			// with weight employed
		egen Asylum_act_w = wtmean(Asylum_own_dummy), weight(dweight_ib)
		egen TaxRich_act_w = wtmean(TaxRich_own_dummy), weight(dweight_ib)
		egen SocBenefits_act_w = wtmean(SocBenefits_own_dummy), weight(dweight_ib)
		egen WomenQuota_act_w = wtmean(WomenQuota_own_dummy), weight(dweight_ib)
		egen LiftCovid_act_w = wtmean(LiftCovid_own_dummy), weight(dweight_ib)
		egen RestrImport_act_w = wtmean(RestrImport_own_dummy), weight(dweight_ib)
		egen LessEU_act_w = wtmean(LessEU_own_dummy), weight(dweight_ib)		
		
	*** Calculate directional error (own estimate of % in favour vs. actual share in favour) per item
		gen Asylum_error=Asylum_est-Asylum_act_w
		gen TaxRich_error=TaxRich_est-TaxRich_act_w
		gen SocBenefits_error=SocBenefits_est-SocBenefits_act_w
		gen WomenQuota_error=WomenQuota_est-WomenQuota_act_w
		gen LiftCovid_error=LiftCovid_est-LiftCovid_act_w
		gen RestrImport_error=RestrImport_est-RestrImport_act_w
		gen LessEU_error=LessEU_est-LessEU_act_w
	
	
*** Populist attitude
	recode icda147a (1=4 "fully agree") (2=3) (3=2) (4=1) (5=0 "fully disagree") (-999/-1=.), gen(CompromiseSellingOut)
	recode icda148a (1=4 "fully agree") (2=3) (3=2) (4=1) (5=0 "fully disagree") (-999/-1=.), gen(PeopleDecide)
	recode icda149a (1=4 "fully agree") (2=3) (3=2) (4=1) (5=0 "fully disagree") (-999/-1=.), gen(WillofPeople)
	recode icda150a (1=4 "fully agree") (2=3) (3=2) (4=1) (5=0 "fully disagree") (-999/-1=.), gen(DiffElitePeople)
	recode icda151a (1=4 "fully agree") (2=3) (3=2) (4=1) (5=0 "fully disagree") (-999/-1=.), gen(CitizenRepresent)
	recode icda152a (1=4 "fully agree") (2=3) (3=2) (4=1) (5=0 "fully disagree") (-999/-1=.), gen(PolTalk)

	*** Wuttke et al. (2020) multiplicative measure
	* Compute subdimension scores
	egen pop_sovereignty = rowmean(PeopleDecide WillofPeople CitizenRepresent) if PeopleDecide<. & WillofPeople<. & CitizenRepresent<.
		sum pop_sovereignty
		replace  pop_sovereignty =  ( pop_sovereignty  + -1*r(min)) / (-1*r(min) + r(max)) if !missing( pop_sovereignty )  // convert to 0-1	

	egen pop_antielite = rowmean(PolTalk DiffElitePeople) if PolTalk<. & DiffElitePeople<.
		sum pop_antielite 
		replace  pop_antielite =  ( pop_antielite  + -1*r(min)) / (-1*r(min) + r(max)) if !missing( pop_antielite )	 // convert to 0-1

	clonevar pop_man_compromise=CompromiseSellingOut
	sum pop_man_compromise
	replace  pop_man_compromise =  ( pop_man_compromise  + -1*r(min)) / (-1*r(min) + r(max)) if !missing( pop_man_compromise ) // convert to 0-1

	* Compute multiplicative populism score 
	gen populism_multipl = pop_antielite * pop_sovereignty * pop_man_compromise	
		
	*** Factor score
	* Table A1: Measurement of populist attitudes 
	factor CitizenRepresent PeopleDecide WillofPeople PolTalk DiffElitePeople CompromiseSellingOut [aweight=dweight_ib], pcf 
	predict populism_factor

		sum populism_factor
		gen populism_factor_st=(populism_factor-r(min))/(r(max)-r(min))
			
	*** Mean index
	gen populism_mean=(CompromiseSellingOut+PeopleDecide+WillofPeople+DiffElitePeople+CitizenRepresent+PolTalk)/4/6

		* compare populist attitude measures
		sum  populism_multipl populism_factor_st populism_mean
		pwcorr populism_multipl	populism_factor_st populism_mean [aweight=dweight_ib]
	
	
*** Control variables	
	* age
	recode hfzh024c (-111=.) (-99=.) (-77=.) (-33=.) (-22=.) (-11=.) (98=.), gen(birthyear) 
	gen age=2021-birthyear
	recode age (1/34=0 "age: -34") (35/49=1 "age: 35-49")	(50/65=2 "age: 50-65") (66/100=3 "age: 66+"), gen(age_group)	
	label variable age_group "age"

	* residence in East Germany (incl. West-Berlin)
	recode a12d021b (-111/-1=.) (1=0) (2=1), gen(east) 
	recode d12d025b (-111/-1=.) (1=0) (2=1), gen(east_d) 
	recode f12d021b (-111/-1=.) (1=0) (2=1), gen(east_f) 
	replace east=east_d if east_d<.
	replace east=east_f if east_f<.
	label variable east "East"
	label define east 0 "West" 1 "East"
	label values east east

	* gender
	recode hfzh023b (1=1) (2=0) (-111/-1=.), gen(male) 
	label variable male "male"
	label define male 0 "female" 1 "male"
	label values male male
			
	* school education
	recode hfzh030a (-111=.) (-99=.) (-77=.) (-33=.) (-22=.) (-11=.) (1=.) (2=0) (3=0) (4=0) (5=1) (6=0) (7=1) (8=2) (9=2), gen(education)
	label define education 0 "education: low" 1 "education: middle" 2 "education: high", replace
	label value education education

	* left-right position
	recode iazc068a  (-111=.) (-99=.) (-77=.) (-33=.) (-22=.) (-11=.) (98=.), gen(LeftRight) 
	replace LeftRight=(LeftRight-1)
	label define LeftRight 0 "left" 10 "right"
	label values LeftRight LeftRight
	label variable LeftRight "left-right position"	
	
	recode LeftRight (0 1 2=0 "far left") (3 4=1 "left") (5=2 "center") (6 7=3 "right") (8 9 10=4 "far right"), gen(LeftRight_coll)

	* household income 
	recode hfzh072c (-111/-1 98=.) (1/3=0 "income: >1700") (4/5=1 "income: 1700-3200") (6/7=2 "income: 3200-5000") (8/9=3 "income: 5000+"), gen(HHincome)
	
	* political interest (self-reported)
	recode iazc030a (-111/-1=.) (5=0) (4=1) (3=2) (2=3) (1=4), gen(PolInt)
	gen PolInt_st=PolInt/4
	label variable PolInt_st "political interest"	


*** other outcome variables  
	* external efficacy 
	recode jazc055a (-111/-1 98=.), gen(Poldontcare)
	recode jazc054a (-111/-1 98=.), gen(Polonlyvotes)

	sum Poldontcare Polonlyvotes
	
	gen ExtEff_st=-(((Poldontcare+Polonlyvotes)-2)/12)+1
		label variable ExtEff_st "external efficacy"
			
	* political trust 
		* Trust Bundesregierung
		recode jazc058a (-111/-1 98=.), gen(TrustGov)	
			gen TrustGov_st=(TrustGov-1)/6				
				
		* Trust Bundestag
		recode jazc057a (-111/-1 98=.), gen(TrustParl)	
			gen TrustParl_st=(TrustParl-1)/6				
							
		* Trust Parties
		recode jazc059a (-111/-1 98=.), gen(TrustPart)	
			gen TrustPart_st=(TrustPart-1)/6				
				
		* Trust Politicians
		recode jazc062a (-111/-1 98=.), gen(TrustPols)	
			gen TrustPols_st=(TrustPols-1)/6				
	
	* trust index
	gen PolTrust_st=(TrustGov_st+TrustParl_st+TrustPart_st+TrustPols_st)/4
		label variable PolTrust_st "political trust"
			
	* democracy satisfaction
	*** democracy satisfaction
	recode jazc067a	(-111/-1 98=.), gen(DemSat)	
	gen DemSat_st=(DemSat-1)/4				
		label variable DemSat_st "satisfaction with democracy"
	
	* vote choice
	recode jazc039a (-111/-1=.) (1=1 "CDU/CSU") (2=2 "SPD") (3=3 "FDP") (4=4 "Left party") (5=5 "Greens") (6=6 "AfD") (7=7 "other party") (98=8 "don't know"), gen(voteintent)
		
	* AfD vote 
	* dummy
	recode jazc039a (-111/-1 98=.) (1 2 3 4 5 7=0 "other party") (6=1 "AfD"), gen(voteintent_AfD)
	* dummy: AfD versus mainstream parties only (Left and Others as missing)
	recode jazc039a (-111/-1 98 4 7=.) (1 2 3 5=0 "other party") (6=1 "AfD"), gen(voteintent_AfDvsMS)

	* Left vote 
	recode jazc039a (-111/-1 98=.) (1 2 3 5 6 7=0 "other party") (4=1 "The Left"), gen(voteintent_Left)
	* dummy: AfD versus mainstream parties only (AfD and Others as missing)
	recode jazc039a (-111/-1 98 6 7=.) (1 2 3 5=0 "other party") (4=1 "The Left"), gen(voteintent_LeftvsMS)
	
	* categorical AfD vs. Left vs. Others
	recode jazc039a (-111/-1 98=.) (1 2 3 5 7=0 "other party") (6=1 "AfD") (4=2 "Left party"), gen(voteintent_cat)
	
	
	
**# Bookmark #3
********************************************************************************
********************** Measuring false consensus beliefs ***********************
********************************************************************************
	
*** stack the dataset to an individual-issue structure
	expand 7, gen(expand)

	egen pid=group(z000001a)
	bysort pid: gen n=_n
	
	egen pidXissue=group(pid n)

	gen issue="Asylum" if n==1
	replace issue="TaxRich" if n==2 
	replace issue="SocBenefits" if n==3
	replace issue="WomenQuota" if n==4 
	replace issue="LiftCovid" if n==5 
	replace issue="RestrImport" if n==6 
	replace issue="LessEU" if n==7
		
	gen own=Asylum_own if n==1
	replace own=TaxRich_own if n==2 
	replace own=SocBenefits_own if n==3
	replace own=WomenQuota_own if n==4 
	replace own=LiftCovid_own if n==5 
	replace own=RestrImport_own if n==6 
	replace own=LessEU_own if n==7

	gen own_tr=Asylum_own_tr if n==1
	replace own_tr=TaxRich_own_tr if n==2 
	replace own_tr=SocBenefits_own_tr if n==3
	replace own_tr=WomenQuota_own_tr if n==4 
	replace own_tr=LiftCovid_own_tr if n==5 
	replace own_tr=RestrImport_own_tr if n==6 
	replace own_tr=LessEU_own_tr if n==7
	
	gen est=Asylum_est if n==1
	replace est=TaxRich_est if n==2 
	replace est=SocBenefits_est if n==3
	replace est=WomenQuota_est if n==4 
	replace est=LiftCovid_est if n==5 
	replace est=RestrImport_est if n==6 
	replace est=LessEU_est if n==7

	gen act=Asylum_act_w if n==1
	replace act=TaxRich_act_w if n==2 
	replace act=SocBenefits_act_w if n==3
	replace act=WomenQuota_act_w if n==4 
	replace act=LiftCovid_act_w if n==5 
	replace act=RestrImport_act_w if n==6 
	replace act=LessEU_act_w if n==7

	gen error=est-act

	
	
***** Measure (1): Mean of error in direction of own opinion
	gen direrror=abs(error) if own_tr==1 | own_tr==-1 
	replace direrror=0 if own_tr==-1 & error>=0 & error<.
	replace direrror=0 if own_tr==1 & error<=0 

	bysort pid: egen FCB1=mean(direrror)	
	
	
***** Measure (2): Minority position & perceived majority share:
	gen FCdummy=0 if own<. & est<.
	replace FCdummy=1 if (own_tr==1 & est>0.5 & est<.) & (issue=="Asylum" | issue=="SocBenefits"  | issue=="LiftCovid" | issue=="RestrImport" | issue=="LessEU")
	replace FCdummy=1 if (own_tr==-1 & est<0.5) & (issue=="TaxRich" | issue=="WomenQuota")
	
	bysort pid: egen FCBdummy_sum=sum(FCdummy)
	bysort pid: egen FCBdummy_nonmiss=count(FCdummy)	

	gen FCB2=FCBdummy_sum/FCBdummy_nonmiss

	corr FCB1 FCB2
	
	
***** Measures (3) and (4): Multilevel regression, regressing estimated opinion on error -> coefficient for own opinion
	mixed error own_tr || pid: own_tr, stddeviations
	
	* obtain estimated slope per individual
	predict randomslope randomintercept, reffects
	gen b_own=_b[own]
	
	*** Measure (3): Mean of error in direction of own opinion
	gen FCB3=b_own+randomslope

	*** Measure (4): Coefficient from multilevel model with negative values set to zero
	gen FCB4=FCB3 if FCB3>=0
	replace FCB4=0 if FCB3<0
	
*** Label FCB measure
label variable FCB1 "false consensus beliefs"
label variable FCB2 "false consensus beliefs"
label variable FCB3 "false consensus beliefs"
label variable FCB4 "false consensus beliefs"
	
	
*** "De-stack" the dataset again
keep if n==1	

*** drop intermittent variables
drop issue own own_tr est act error FCdummy FCBdummy_sum FCBdummy_nonmiss randomslope randomintercept b_own
		
		
	
**# Bookmark #4
********************************************************************************
******************* Main descriptive results ***********************************
********************************************************************************
	
*** Figure 1: Estimated agreement on the seven policy proposals by own position 
	corr Asylum_est Asylum_own_tr
	sum Asylum_act_w 
	local actagree=r(mean)

	twoway (kdensity Asylum_est if Asylum_own_tr==-1, lcolor(navy)) ///
			(kdensity Asylum_est if Asylum_own_tr==0, lcolor(gs10)) ///
			(kdensity Asylum_est if Asylum_own_tr==1, lcolor(orange_red)) ///
			, legend(off) xtitle(" ", size(zero)) ytitle(" ") title(Abolish right to asylum) ///
			xline(`actagree', lcolor(black) lpattern(solid) lwidth(0.5)) ///
			note("n=4,151", pos(5)) ///
			name(Asylum, replace) nodraw

	corr TaxRich_est TaxRich_own_tr
	sum TaxRich_act_w
	local actagree=r(mean)
			
	twoway (kdensity TaxRich_est if TaxRich_own_tr==-1, lcolor(navy)) ///
			(kdensity TaxRich_est if TaxRich_own_tr==0, lcolor(gs10)) ///
			(kdensity TaxRich_est if TaxRich_own_tr==1, lcolor(orange_red)) ///
			, legend(off) xtitle(" ", size(zero)) ytitle(" ") title(Higher taxes on the rich) ///
			xline(`actagree', lcolor(black) lpattern(solid) lwidth(0.5)) ///
			note("n=4,144", pos(5)) ///
			name(TaxRich, replace) nodraw

	corr SocBenefits_est SocBenefits_own_tr
	sum SocBenefits_act_w
	local actagree=r(mean)
			
	twoway (kdensity SocBenefits_est if SocBenefits_own_tr==-1, lcolor(navy)) ///
			(kdensity SocBenefits_est if SocBenefits_own_tr==0, lcolor(gs10)) ///
			(kdensity SocBenefits_est if SocBenefits_own_tr==1, lcolor(orange_red)) ///
			, legend(off) xtitle(" ", size(zero)) ytitle(" ") title(Higher unemployment benefits) ///
			xline(`actagree', lcolor(black) lpattern(solid) lwidth(0.5)) ///
			note("n=4,141", pos(5)) ///
			name(SocBenefits, replace) nodraw

	corr WomenQuota_est	WomenQuota_own_tr	
	sum WomenQuota_act_w
	local actagree=r(mean)

	twoway (kdensity WomenQuota_est if WomenQuota_own_tr==-1, lcolor(navy)) ///
			(kdensity WomenQuota_est if WomenQuota_own_tr==0, lcolor(gs10)) ///
			(kdensity WomenQuota_est if WomenQuota_own_tr==1, lcolor(orange_red)) ///
			, legend(off) xtitle(" ", size(zero)) ytitle(" ") title(Mandatory women's quota) ///
			xline(`actagree', lcolor(black) lpattern(solid) lwidth(0.5)) ///
			note("n=4,154", pos(5)) ///
			name(WomenQuota, replace) nodraw	 	

	corr LiftCovid_est LiftCovid_own_tr
	sum LiftCovid_act_w
	local actagree=r(mean)

	twoway (kdensity LiftCovid_est if LiftCovid_own_tr==-1, lcolor(navy)) ///
			(kdensity LiftCovid_est if LiftCovid_own_tr==0, lcolor(gs10)) ///
			(kdensity LiftCovid_est if LiftCovid_own_tr==1, lcolor(orange_red)) ///
			, legend(off) xtitle(" ", size(zero)) ytitle(" ") title(Lift COVID measures) ///
			xline(`actagree', lcolor(black) lpattern(solid) lwidth(0.5)) ///
			text(1.6 0.12 "against", color(navy)) ///
			text(3.0 0.50 "partly/partly", color(gs10)) ///
			text(2.6 0.85 "in favour", color(orange_red)) ///
			text(0.1 0.45 "actual agreement", color(black)) ///
			note("n=4,160", pos(5)) ///
			name(LiftCovid, replace) nodraw			
			
	corr RestrImport_est RestrImport_own_tr
	sum RestrImport_act_w
	local actagree=r(mean)

	twoway (kdensity RestrImport_est if RestrImport_own_tr==-1, lcolor(navy)) ///
			(kdensity RestrImport_est if RestrImport_own_tr==0, lcolor(gs10)) ///
			(kdensity RestrImport_est if RestrImport_own_tr==1, lcolor(orange_red)) ///
			, legend(off) xtitle(" ", size(zero)) ytitle(" ") title(Restrict imports) ///
			xline(`actagree', lcolor(black) lpattern(solid) lwidth(0.5)) ///
			note("n=4,124", pos(5)) ///
			name(RestrImport, replace) nodraw					

	corr LessEU_est LessEU_own_tr
	sum LessEU_act_w
	local actagree=r(mean)
			
	twoway (kdensity LessEU_est if LessEU_own_tr==-1, lcolor(navy)) ///
			(kdensity LessEU_est if LessEU_own_tr==0, lcolor(gs10)) ///
			(kdensity LessEU_est if LessEU_own_tr==1, lcolor(orange_red)) ///
			, legend(off) xtitle(" ", size(zero)) ytitle(" ") title(Return EU powers) ///
			xline(`actagree', lcolor(black) lpattern(solid) lwidth(0.5)) ///
			note("n=4,086", pos(5)) ///
			name(LessEU, replace) nodraw					

	graph combine LiftCovid Asylum LessEU RestrImport WomenQuota TaxRich SocBenefits, col(2) iscale(*1.05) ysize(5) ycommon imargin(tiny) name(Figure1, replace)
	
		graph export Figure1.jpg, width(5000) fontface("Times New Roman") replace
	
	
*** Figure 2: Bivariate association between false consensus beliefs and populist attitudes
	sum populism_factor_st populism_multipl FCB1 [aweight=dweight_ib]
	pwcorr populism_factor_st populism_multipl FCB1 [aweight=dweight_ib]
	
	twoway (scatter populism_multipl FCB1, msymbol(.) mcolor(black%12) msize(small) jitter(2) ytitle("Populist attitudes") xtitle("False consensus beliefs") xlabel(.0 .1 .2 .3 .4 .5 .6 .7, gmin gmax)) ///
		(lfit populism_multipl FCB1, lcolor(navy) lpattern(solid)) (lowess populism_multipl FCB1, lcolor(orange_red) lpattern(dash)), legend(off) text(.1 .6 "r=0.42, n=3,830") scale(*1.2) name(Figure2, replace) 	
		
		graph export Figure2.jpg, width(5000) fontface("Times New Roman") replace

		
**# Bookmark #5		
****************************************************************************************************
********************** Appendix section A: Additional descriptive results **************************
****************************************************************************************************		
		
*** Figure A1: Holding the minority position by left-right self-placement   
		* how often do respondents hold the minority position?
		gen LiftCovid_minority=0 if LiftCovid_own<. 
		replace LiftCovid_minority=1 if (LiftCovid_own==3 | LiftCovid_own==4) 
		
		gen Asylum_minority=0 if Asylum_own<. 
		replace Asylum_minority=1 if (Asylum_own==3 | Asylum_own==4) 	
		
		gen LessEU_minority=0 if LessEU_own<. 
		replace LessEU_minority=1 if (LessEU_own==3 | LessEU_own==4)

		gen RestrImport_minority=0 if RestrImport_own<. 
		replace RestrImport_minority=1 if (RestrImport_own==3 | RestrImport_own==4)

		gen SocBenefits_minority=0 if SocBenefits_own<. 
		replace SocBenefits_minority=1 if (SocBenefits_own==3 | SocBenefits_own==4) 
		
		gen TaxRich_minority=0 if TaxRich_own<. 
		replace TaxRich_minority=1 if (TaxRich_own==0 | TaxRich_own==1) 

		gen WomenQuota_minority=0 if WomenQuota_own<. 
		replace WomenQuota_minority=1 if (WomenQuota_own==0 | WomenQuota_own==1) 
		
		egen issue_nonmiss=rownonmiss(LiftCovid_minority Asylum_minority LessEU_minority RestrImport_minority SocBenefits_minority TaxRich_minority WomenQuota_minority)
		egen minority_count=rowtotal(LiftCovid_minority Asylum_minority LessEU_minority RestrImport_minority SocBenefits_minority TaxRich_minority WomenQuota_minority) if issue_nonmiss==7
	
		fre issue_nonmiss if LeftRight_coll<. & issue_nonmiss!=0
	
	hist minority_count, discrete percent xlabel(0/7) by(LeftRight_coll, total note(" ") legend(off)) ///
		xtitle("how often respondents hold the minority position") ylabel(0 (10) 50)  ytitle("percent") scale(*1.6) ///
		addlabopts(yvarformat(%8.1f) mlabsize(small) mlabgap(0)) name(FigureA1, replace) 
		
	
*** Table A2: Correlations between attitudinal outcome variables 
	capture drop complete_data
	gen complete_data = !missing(populism_multipl, populism_factor_st, pop_sovereignty, pop_antielite, pop_man_compromise, ExtEff_st, PolTrust_st, DemSat_st)	


	pwcorr populism_multipl populism_factor_st pop_sovereignty pop_antielite	pop_man_compromise ExtEff_st PolTrust_st DemSat_st [aweight=dweight_ib] if complete_data==1, sig

	
		
**# Bookmark #6
****************************************************************************************************************
**************** Main regression results: Regressing populist attitudes on false consensus beliefs *************
****************************************************************************************************************	
					
*** Table 2: Regressing populist attitudes on false consensus beliefs 
	* hold sample constant	
	capture drop complete_data
	gen complete_data = !missing(populism_multipl, FCB1, FCB2, FCB3, FCB4, age_group, male, education, east, PolInt_st, Asylum_own_st, TaxRich_own_st, SocBenefits_own_st, WomenQuota_own_st, LiftCovid_own_st, RestrImport_own_st, LessEU_own_st, dweight_ib, LeftRight_coll)	
		
	* model 1
		reg populism_multipl FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m1
		
			sum FCB1 if e(sample)		
			
			margins, at(FCB1=(0 .676))
	
	* model 2
		reg populism_factor_st FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m2	
			
			margins, at(FCB1=(0 .676))
	
	* model 3
		reg pop_sovereignty FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m3		
			
	* model 4
		reg pop_antielite FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m4	
		
	* model 5
	label variable pop_man_compromise "pop_manichean"
		reg pop_man_compromise FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m5	
	
	* model 6
		reg populism_multipl c.FCB1##ib2.LeftRight_coll i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1
			eststo m6
			
	*** Regression table
	esttab m1 m2 m3 m4 m5 m6 using "Table2.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
			drop(0.age_group 0.male 0.education 0.east 2.LeftRight_coll 2.LeftRight_coll#c.FCB1) ///
			varwidth(30) nogaps compress replace label scalars(r2) 
			
		
*** Figure 3: Predicted values of populist attitudes across levels of false consensus beliefs
	estimates restore m1
	sum FCB1 if e(sample)
	
	margins, at(FCB1=(0 (.005) .7)) post
	eststo marg1
	
		marginsplot, yline(0) ///
			addplot(hist FCB1 if e(sample), fcolor(%20) percent yaxis(2) yscale(alt range(0 18) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) xlabel(0 (.05) 0.7, gmin gmax)) legend(off) ///
			title("", size(medsmall)) ytitle("Predicted populist attitude") xtitle("False consensus beliefs") scale(*1.2) ///
			recast(line) recastci(rarea) ///
			name(Figure3, replace)	
	
			graph export Figure3.jpg, width(5000) fontface("Times New Roman") replace

			
*** Figure 4: False consensus beliefs and their effects on populist attitudes across the left-right scale
		estimates restore m6				
			
		ciplot FCB1, by(LeftRight_coll) horizontal xlabel(0 (.05) .2, gmin gmax) ///
			xline(0, lcolor(black) lwidth(0.3)) ///
			note(" ", size(zero)) xtitle(" ", size(tiny)) ytitle(" ", size(zero)) ///
			title("Mean of false consensus beliefs", size(small)) name(gr1, replace)

		sum FCB1 if e(sample), d

		margins, dydx(FCB1) at(LeftRight_coll=(0/4)) post
			eststo marg1
		
		coefplot marg1, level(95 90) xline(0, lcolor(black) lwidth(0.3)) ///
			coeflabels(1._at="far left" 2._at="left" 3._at="center" 4._at="right" 5._at="far right") ///
			mlabel format(%9.2f) mlabposition(12) mlabgap(*2) ///
			xlabel(0 (.2) .8, gmin gmax)  ///
			title("Conditional effect of false consensus beliefs", size(small)) xtitle(" ", size(vsmall)) ///
			name(gr2, replace)
		
		graph combine gr1 gr2, imargin(tiny) iscale(*1.7) xsize(7) name(Figure4, replace)	
		
			graph export Figure4.jpg, width(5000) fontface("Times New Roman") replace
	
			
			
**# Bookmark #7
************************************************************************************************************************************************
**************** Appendix section B: Alternative measures of false consensus beliefs and their association with populist attitudes *************
************************************************************************************************************************************************		

*** Table B1: Correlations between different measures of false consensus beliefs 		
	pwcorr FCB1 FCB2 FCB3 FCB4 if complete_data==1 [aweight=dweight_ib], obs sig

					
*** Table B2: Regressing populist attitudes on alternative measures of false consensus beliefs: Minority position & perceived majority share 
	* model 1
		reg populism_multipl FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m1
		
	* model 2
		reg populism_factor_st FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m2	
			
	* model 3
		reg pop_sovereignty FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m3		
			
	* model 4
		reg pop_antielite FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m4	
		
	* model 5
		reg pop_man_compromise FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m5	
	
	* model 6
		reg populism_multipl c.FCB2##ib2.LeftRight_coll i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1
			eststo m6
			
	*** Regression table
	esttab m1 m2 m3 m4 m5 m6 using "TableB2.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
			drop(0.age_group 0.male 0.education 0.east 2.LeftRight_coll 2.LeftRight_coll#c.FCB2) ///
			varwidth(30) nogaps label compress replace scalars(r2) 			
					
			
*** Table B3: Regressing populist attitudes on alternative measures of false consensus beliefs: Coefficient from multilevel model
	* model 1
		reg populism_multipl FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m1
		
	* model 2
		reg populism_factor_st FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m2	
			
	* model 3
		reg pop_sovereignty FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m3		
			
	* model 4
		reg pop_antielite FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m4	
		
	* model 5
		reg pop_man_compromise FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m5	
	
	* model 6
		reg populism_multipl c.FCB3##ib2.LeftRight_coll i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1
			eststo m6
			
	*** Regression table
	esttab m1 m2 m3 m4 m5 m6 using "TableB3.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
			drop(0.age_group 0.male 0.education 0.east 2.LeftRight_coll 2.LeftRight_coll#c.FCB3) ///
			varwidth(30) nogaps label compress replace scalars(r2) 			
		
		
*** Table B4: Regressing populist attitudes on alternative measures of false consensus beliefs: Coefficient from multilevel model with negative values set to zero
	* model 1
		reg populism_multipl FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m1
		
	* model 2
		reg populism_factor_st FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m2	
			
	* model 3
		reg pop_sovereignty FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m3		
			
	* model 4
		reg pop_antielite FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m4	
		
	* model 5
		reg pop_man_compromise FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m5	
	
	* model 6
		reg populism_multipl c.FCB4##ib2.LeftRight_coll i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1
			eststo m6
			
	*** Regression table
	esttab m1 m2 m3 m4 m5 m6 using "TableB4.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
			drop(0.age_group 0.male 0.education 0.east 2.LeftRight_coll 2.LeftRight_coll#c.FCB4) ///
			varwidth(30) nogaps label compress replace scalars(r2) 
		
		
		
*** Figure B1: Predicted values of populist attitudes across levels of false consensus beliefs with squared terms added
			
	reg populism_multipl c.FCB1##c.FCB1 i.age_group i.male i.education i.east PolInt_st ///
		Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st ///	
		RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m1
			
	reg populism_multipl c.FCB2##c.FCB2 i.age_group i.male i.education i.east PolInt_st ///
		Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st ///		
		RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m2		

	reg populism_multipl c.FCB3##c.FCB3 i.age_group i.male i.education i.east PolInt_st ///
		Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st ///		
		RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m3
			
	reg populism_multipl c.FCB4##c.FCB4 i.age_group i.male i.education i.east PolInt_st ///
		Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st ///		
		RestrImport_own_st LessEU_own_st [pweight=dweight_ib] if complete_data==1, beta
			eststo m4			
		
	estimates restore m1
		sum FCB1 if e(sample)		
			
	margins, at(FCB1=(0 (.05) .7)) post
	eststo marg1
	
	estimates restore marg1
		marginsplot,  ///
			addplot(hist FCB1 if e(sample), fcolor(%20) percent yaxis(2) yscale(alt range(0 40) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ylabel(0 (0.2) 0.8, gmin gmax) xlabel(0 (.1) 0.7, gmin gmax)) legend(off) ///
			title("Mean of error in direction of own opinion", size(medsmall)) ytitle("Predicted populist attitude") xtitle("False consensus belief") ///
			recast(line) recastci(rarea) ///
			name(marg1, replace)				
	
	estimates restore m2
		sum FCB2 if e(sample)		
			
	margins, at(FCB2=(0 (.05) 1)) post
	eststo marg2
	
	estimates restore marg2
		marginsplot, ///
			addplot(hist FCB2 if e(sample), fcolor(%20) percent yaxis(2) yscale(alt range(0 40) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ylabel(0 (0.2) 0.8, gmin gmax) xlabel(0 (.1) 1, gmin gmax)) legend(off) ///
			title("Minority-perceived majority share", size(medsmall)) ytitle("Predicted populist attitude") xtitle("False consensus belief") ///
			recast(line) recastci(rarea) ///
			name(marg2, replace)

	estimates restore m3
		sum FCB3 if e(sample)		
			
	margins, at(FCB3=(-.20 (.05) .30)) post
	eststo marg3
	
	estimates restore marg3
		marginsplot, ///
			addplot(hist FCB3 if e(sample), fcolor(%20) percent yaxis(2) yscale(alt range(0 40) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2))  ylabel(0 (0.2) 0.8, gmin gmax) xlabel(-.2 (.1) .3, gmin gmax)) legend(off) ///
			title("Coefficient from ML model", size(medsmall)) ytitle("Predicted populist attitude") xtitle("False consensus belief") ///
			recast(line) recastci(rarea) ///
			name(marg3, replace)
			
			
	estimates restore m4
		sum FCB4 if e(sample)		
		
	margins, at(FCB4=(.0 (.025) .3)) post
	eststo marg4
	
	estimates restore marg4
		marginsplot, ///
			addplot(hist FCB4 if e(sample), fcolor(%20) percent yaxis(2) yscale(alt range(0 40) axis(2)) ytitle(" ", size(zero) axis(2)) ylabel(none, axis(2)) ylabel(0 (0.2) 0.8, gmin gmax) xlabel(.0 (.1) .3, gmin gmax)) legend(off) ///
			title("Coefficient from ML model, <0 set to zero", size(medsmall)) ytitle("Predicted populist attitude") xtitle("False consensus belief") ///
			recast(line) recastci(rarea) ///
			name(marg4, replace)		
			
	graph combine marg1 marg2 marg3 marg4, ///
		row(3) imargin(tiny) iscale(*1.2) ///
		name(FigureB1, replace)
	
	graph export FigureB1.jpg, width(3000) fontface("Times New Roman") replace
						
			
			
**# Bookmark #8
********************************************************************************************************
******** Appendix section C: Additional results for other indicators of political support  *************
********************************************************************************************************				

************************* Regressions *******************************			
	reg ExtEff_st FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m1					
			
	reg PolTrust FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m2					
				
	reg DemSat_st FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m3


	* Coefficient plot
	coefplot (m1 \ m2 \ m3), ///
		keep(FCB1) xline(0, lcolor(black) lwidth(0.3)) ///
		level(95 90) aseq swapnames ///
		mlabel format(%9.2f) mlabposition(12) mlabgap(*2) ///
		coeflabels(m1 = "external efficacy" ///
				   m2 = "political trust" ///
				   m3 = "satisfaction with democracy") ///
  			   xlabel(-0.25 "-.25" -0.20 "-.20" -0.15 "-.15" -0.10 "-.10" -0.05 "-.05" 0 ".0" 0.05 ".05", gmin gmax) ///
			   scale(*2.2) xsize(10) ///
			   name(Figure5, replace)	
			   
			   	graph export Figure5.jpg, width(3000) fontface("Times New Roman") replace


	* Regression table
	esttab m1 m2 m3 using "TableC1.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
		drop(0.age_group 0.male 0.education 0.east) ///
		varwidth(30) nogaps compress replace label scalars(r2) 

		
		
***** Table C2: Regression results for other indicators of political support with alternative measures of false consensus beliefs
	
	reg ExtEff_st FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m4					
			
	reg PolTrust FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m5					
				
	reg DemSat_st FCB2 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m6
			
	reg ExtEff_st FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m7					
			
	reg PolTrust FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m8					
				
	reg DemSat_st FCB3 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m9
			
	reg ExtEff_st FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m10					
			
	reg PolTrust FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m11					
				
	reg DemSat_st FCB4 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			eststo m12
	
	* Regression table
	esttab m4 m5 m6 m7 m8 m9 m10 m11 m12 using "TableC2.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
		order(FCB*) ///
		drop(0.age_group 0.male 0.education 0.east) ///
		varwidth(30) nogaps compress replace label scalars(r2)
			
			
			
			   
**# Bookmark #9
********************************************************************************
**************** Appendix section D: Results for vote choice  ******************
********************************************************************************			   
	
	*** Figure D1: Distribution of false consensus beliefs by voting intention
	sum FCB1 [aweight=dweight_ib]
	bysort voteintent: sum FCB1 [aweight=dweight_ib]
	bysort voteintent_AfD: sum FCB1 [aweight=dweight_ib]
	
	recode voteintent (-111/-1=.) (1=5 "CDU/CSU") (2=2 "SPD") (3=4 "FDP") (4=3 "Left party") (5=1 "Greens") (6=7 "AfD") (7=6 "other party") (8=.), gen(voteintent_sorted)
	   
	ridgeline FCB1, by(voteintent_sorted) bwidth(0.015) xlabel(0 (.1) .7, gmin gmax labsize(vsmall)) overlap(3) palette(green red purple gold black gs8 blue) mark(mean, line) labpos(10) labs(3) graphregion(margin(l+20)) name(FigureD1, replace)
		   
		   
	*** Regression: with main measure of false consensus beliefs  
	logit voteintent_AfD FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			estadd fitstat 
			eststo m1
			
		margins, dydx(FCB1) post
			eststo marg1
		
	logit voteintent_AfDvsMS FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
			estadd fitstat 
			eststo m2
			
		margins, dydx(FCB1) post
			eststo marg2
			
				estimates restore m2
				margins, dydx(FCB1) at(Asylum_own_st=(1) LiftCovid_own_st=(1) WomenQuota_own_st=(0) LessEU_own_st=(1))
				margins, dydx(FCB1) at(Asylum_own_st=(0) LiftCovid_own_st=(0) WomenQuota_own_st=(1) LessEU_own_st=(0))
			
	logit voteintent_Left FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]			
			estadd fitstat 
			eststo m3
			
		margins, dydx(FCB1) post
			eststo marg3
			
	logit voteintent_LeftvsMS FCB1 i.age_group i.male i.education i.east PolInt_st ///
			Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]	
			estadd fitstat 
			eststo m4
			
		margins, dydx(FCB1) post
			eststo marg4
			
	* Figure D2: Marginal effects of false consensus beliefs on voting intention
	coefplot (marg1 \ marg2 \ marg3 \ marg4), ///
		keep(FCB1) xline(0) level(95 90) aseq swapnames ///
		mlabel format(%9.2f) mlabposition(12) mlabgap(*2) ///
		coeflabels(marg1 = "voting intention: AfD (vs. any other)" ///
				   marg2 = "voting intention: AfD (vs. mainstream)" ///
				   marg3 = "voting intention: Left (vs. any other)" ///
				   marg4 = "voting intention: Left (vs. mainstream)") ///
  			   xlabel(-0.10 "-.10" -0.05 "-.05" 0 ".0" 0.05 ".05" 0.10 ".1" 0.15 ".15" 0.20 ".20", gmin gmax) ///
			   scale(*2.2) xsize(12) ///
			   name(FigureD2, replace)				
		
	* Table D1: Full regression results for Figure D2 (effects of false consensus beliefs on voting intention)
	esttab m1 m2 m3 m4 using "TableD1.rtf", b(a2) se(a2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) ///
		nomtitles ///
		drop(0.age_group 0.male 0.education 0.east) ///
		varwidth(30) nogaps compress replace label scalars(r2_mz)	
		
		
	*** Figure D3: Marginal effects of false consensus beliefs on voting intention with alternative measures of false consensus beliefs	
		* Minority position & perceived majority share  
			logit voteintent_AfD FCB2 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
					estadd fitstat 
					eststo m1
					
				margins, dydx(FCB2) post
					eststo marg1
				
			logit voteintent_AfDvsMS FCB2 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
					estadd fitstat 
					eststo m2
					
				margins, dydx(FCB2) post
					eststo marg2
					
			logit voteintent_Left FCB2 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]			
					estadd fitstat 
					eststo m3
					
				margins, dydx(FCB2) post
					eststo marg3
					
			logit voteintent_LeftvsMS FCB2 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]	
					estadd fitstat 
					eststo m4
					
				margins, dydx(FCB2) post
					eststo marg4
					
			* coefficient plot
			coefplot (marg1 \ marg2 \ marg3 \ marg4), ///
				keep(FCB2) xline(0) level(95 90) aseq swapnames ///
				mlabel format(%9.2f) mlabposition(12) mlabgap(*2) ///
				coeflabels(marg1 = "voting intention: AfD (vs. any other)" ///
						   marg2 = "voting intention: AfD (vs. mainstream)" ///
						   marg3 = "voting intention: Left (vs. any other)" ///
						   marg4 = "voting intention: Left (vs. mainstream)") ///
					   scale(*2.2) xsize(12) ///
					   title("Minority position & perceived majority share", size(medsmall)) ///
					   name(FigureD3a, replace)		
				
		* Coefficient from multilevel model
			logit voteintent_AfD FCB3 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
					estadd fitstat 
					eststo m1
					
				margins, dydx(FCB3) post
					eststo marg1
				
			logit voteintent_AfDvsMS FCB3 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
					estadd fitstat 
					eststo m2
					
				margins, dydx(FCB3) post
					eststo marg2
					
			logit voteintent_Left FCB3 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]			
					estadd fitstat 
					eststo m3
					
				margins, dydx(FCB3) post
					eststo marg3
					
			logit voteintent_LeftvsMS FCB3 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]	
					estadd fitstat 
					eststo m4
					
				margins, dydx(FCB3) post
					eststo marg4
					
			* coefficient plot
			coefplot (marg1 \ marg2 \ marg3 \ marg4), ///
				keep(FCB3) xline(0) level(95 90) aseq swapnames ///
				mlabel format(%9.2f) mlabposition(12) mlabgap(*2) ///
				coeflabels(marg1 = "voting intention: AfD (vs. any other)" ///
						   marg2 = "voting intention: AfD (vs. mainstream)" ///
						   marg3 = "voting intention: Left (vs. any other)" ///
						   marg4 = "voting intention: Left (vs. mainstream)") ///
					   scale(*2.2) xsize(12) ///
					   title("Coefficient from ML model", size(medsmall)) ///
					   name(FigureD3b, replace)		
			
			* Coefficient from multilevel model with negative values set to zero
			logit voteintent_AfD FCB4 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
					estadd fitstat 
					eststo m1
					
				margins, dydx(FCB4) post
					eststo marg1
				
			logit voteintent_AfDvsMS FCB4 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]
					estadd fitstat 
					eststo m2
					
				margins, dydx(FCB4) post
					eststo marg2
					
			logit voteintent_Left FCB4 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]			
					estadd fitstat 
					eststo m3
					
				margins, dydx(FCB4) post
					eststo marg3
					
			logit voteintent_LeftvsMS FCB4 i.age_group i.male i.education i.east PolInt_st ///
					Asylum_own_st TaxRich_own_st SocBenefits_own_st WomenQuota_own_st LiftCovid_own_st RestrImport_own_st LessEU_own_st [pweight=dweight_ib]	
					estadd fitstat 
					eststo m4
					
				margins, dydx(FCB4) post
					eststo marg4
					
			* coefficient plot
			coefplot (marg1 \ marg2 \ marg3 \ marg4), ///
				keep(FCB4) xline(0) level(95 90) aseq swapnames ///
				mlabel format(%9.2f) mlabposition(12) mlabgap(*2) ///
				coeflabels(marg1 = "voting intention: AfD (vs. any other)" ///
						   marg2 = "voting intention: AfD (vs. mainstream)" ///
						   marg3 = "voting intention: Left (vs. any other)" ///
						   marg4 = "voting intention: Left (vs. mainstream)") ///
					   scale(*2.2) xsize(12) ///
					   title("Coefficient from ML model, <0 set to zero", size(medsmall)) ///
					   name(FigureD3c, replace)		
								
				
			* combine graphs
			graph combine FigureD3a FigureD3b FigureD3c, col(1) xcommon iscale(*0.5) ysize(6) name(FigureD3, replace)
			
			* Close intermittent graphs
			graph drop gr* marg* FigureD3a FigureD3b FigureD3c